<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>吉象出海 - 个人中心</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary: #EAA82A;  /* 大象黄 - 品牌主色 */
            --secondary: #2E8B57; /* 森林绿 - 辅助色 */
            --danger: #D0021B;   /* 警示红 */
            --text: #374151;    /* 主要文字色 */
            --light-bg: #F8F9FA; /* 浅灰背景 */
            --card-shadow: 0 2px 12px rgba(0,0,0,0.06);
            --section-bg: #F5F7FA; /* 分组背景色 */
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        }   a {
            color: inherit;
            text-decoration: none;
        }
        
        body {
            background-color: #fff;
            color: var(--text);
            max-width: 428px;
            margin: 0 auto;
            padding-bottom: 60px;
        }
        
        /* 顶部品牌区 */
        .brand-header {
            text-align: center;
            padding: 12px 15px;
            background: linear-gradient(to bottom, #ffffff, #F8F9FA);
            position: relative;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid #eee;
        }
        
        .back-btn {
            font-size: 20px;
            color: var(--primary);
            cursor: pointer;
        }
        
        .brand-title {
            font-size: 22px;
            font-weight: 700;
            color: var(--primary);
        }
        
        .brand-subtitle {
            font-size: 12px;
            color: var(--text);
            letter-spacing: 2px;
            opacity: 0.8;
            text-align: center;
        }
        
        .rate-badge {
            background: var(--secondary);
            color: white;
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }
        
        /* 用户身份卡片 */
        .profile-card {
            background: linear-gradient(135deg, #fff 0%, #fef9e7 100%);
            border-radius: 16px;
            margin: 15px;
            padding: 20px;
            box-shadow: var(--card-shadow);
            position: relative;
            overflow: hidden;
            border: 1px solid #f5e6c1;
        }
        
        .profile-card::before {
            content: "";
            position: absolute;
            top: 0;
            right: 0;
            width: 80px;
            height: 80px;
            background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="%23EAA82A" opacity="0.1" d="M50,15A35,35,0,1,1,15,50,35,35,0,0,1,50,15Z"/></svg>') no-repeat;
            background-size: contain;
        }
        
        .user-info {
            position: relative;
            z-index: 2;
        }
        
        .user-name {
            font-size: 22px;
            font-weight: 700;
            display: flex;
            align-items: center;
            margin-bottom: 5px;
        }
        
        .user-name .crown {
            color: var(--primary);
            margin-right: 8px;
        }
        
        .user-location {
            font-size: 15px;
            color: var(--text);
            margin-bottom: 15px;
            display: flex;
            align-items: center;
        }
        
        .user-location i {
            margin-right: 5px;
            color: var(--secondary);
        }
        
        .trust-badges {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 15px;
        }
        
        .trust-badge {
            background: rgba(46, 139, 87, 0.1);
            color: var(--secondary);
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
            display: flex;
            align-items: center;
        }
        
        .trust-badge i {
            margin-right: 5px;
        }
        
        .user-id {
            font-size: 13px;
            color: #6B7280;
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px dashed #eee;
            display: flex;
            justify-content: space-between;
        }
        
        .vip-link {
            color: var(--primary);
            font-weight: 600;
        }
        
        /* 中介认证条 */
        .agent-bar {
            background: linear-gradient(to right, #fff8e1, #fef5e7);
            border-radius: 12px;
            margin: 0 15px 15px;
            padding: 15px;
            border: 1px solid #f5e6c1;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: var(--card-shadow);
        }
        
        .agent-info {
            flex: 1;
        }
        
        .agent-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 5px;
            display: flex;
            align-items: center;
        }
        
        .agent-title i {
            margin-right: 8px;
            color: var(--primary);
        }
        
        .agent-desc {
            font-size: 13px;
            color: #6B7280;
        }
        
        .agent-btn {
            background: var(--primary);
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            white-space: nowrap;
        }
        
        .agent-btn:hover {
            background: #d6941a;
            transform: translateY(-2px);
        }
        
        /* 服务分进度条 */
        .score-container {
            background: white;
            border-radius: 16px;
            margin: 15px;
            padding: 20px;
            box-shadow: var(--card-shadow);
        }
        
        .score-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .score-title {
            font-size: 18px;
            font-weight: 700;
        }
        
        .score-value {
            font-size: 24px;
            font-weight: 700;
            color: var(--secondary);
        }
        
        .progress-bar {
            height: 10px;
            background: #e5e7eb;
            border-radius: 5px;
            overflow: hidden;
            margin-bottom: 10px;
            position: relative;
        }
        
        .progress-fill {
            height: 100%;
            background: var(--secondary);
            border-radius: 5px;
            width: 87%;
        }
        
        .progress-label {
            font-size: 13px;
            color: #6B7280;
            text-align: right;
        }
        
        .progress-stats {
            font-size: 14px;
            color: var(--secondary);
            font-weight: 600;
            margin-top: 8px;
            display: flex;
            align-items: center;
        }
        
        .progress-stats i {
            margin-right: 5px;
        }
        
        /* 功能分区 */
        .section {
            margin: 20px 15px;
        }
        
        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--primary);
        }
        
        .section-title {
            font-size: 18px;
            font-weight: 700;
            display: flex;
            align-items: center;
        }
        
        .section-title::before {
            content: "";
            display: inline-block;
            width: 4px;
            height: 18px;
            background: var(--primary);
            margin-right: 8px;
            border-radius: 2px;
        }
        
        .tools-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
            margin-bottom: 20px;
        }
        
        .tool-card {
            background: white;
            border-radius: 16px;
            padding: 20px 10px;
            text-align: center;
            box-shadow: var(--card-shadow);
            transition: all 0.3s ease;
            cursor: pointer;
            border: 1px solid #f3f4f6;
        }
        
        .tool-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.08);
            border-color: var(--primary);
        }
        
        .tool-icon {
            width: 50px;
            height: 50px;
            margin: 0 auto 15px;
            background: var(--light-bg);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: var(--primary);
        }
        
        .tool-card:hover .tool-icon {
            background: rgba(234, 168, 42, 0.1);
        }
        
        .tool-name {
            font-size: 15px;
            font-weight: 600;
        }
        
        /* 功能分组 */
        .function-group {
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: var(--card-shadow);
            margin-bottom: 20px;
        }
        
        .function-item {
            display: flex;
            align-items: center;
            padding: 18px 20px;
            border-bottom: 1px solid #f3f4f6;
            transition: all 0.3s;
            cursor: pointer;
        }
        
        .function-item:last-child {
            border-bottom: none;
        }
        
        .function-item:hover {
            background: #fdf6e9;
        }
        
        .function-icon {
            width: 40px;
            height: 40px;
            background: var(--light-bg);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            color: var(--primary);
            margin-right: 15px;
        }
        
        .function-name {
            font-size: 16px;
            font-weight: 500;
            flex: 1;
        }
        
        .function-value {
            font-size: 14px;
            color: #6B7280;
        }
        
        .expand-icon {
            color: #9CA3AF;
            font-size: 18px;
            margin-left: 10px;
        }
        
        .sub-items {
            padding: 0 20px;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
            background: #fafafa;
        }
        
        .sub-items.show {
            max-height: 500px;
        }
        
        .sub-item {
            padding: 15px 0 15px 55px;
            border-bottom: 1px solid #f3f4f6;
            display: flex;
            align-items: center;
            font-size: 15px;
            position: relative;
        }
        
        .sub-item:last-child {
            border-bottom: none;
        }
        
        .sub-item::before {
            content: "";
            position: absolute;
            left: 25px;
            width: 6px;
            height: 6px;
            background: var(--primary);
            border-radius: 50%;
        }
        
        /* 法律保障 */
        .legal-section {
            margin: 25px 15px;
            text-align: center;
        }
        
        .legal-card {
            background: white;
            border-radius: 16px;
            padding: 20px;
            box-shadow: var(--card-shadow);
            border: 1px solid #f3f4f6;
            display: flex;
            align-items: center;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .legal-card:hover {
            transform: translateY(-3px);
            border-color: var(--secondary);
        }
        
        .legal-icon {
            width: 50px;
            height: 50px;
            background: rgba(46, 139, 87, 0.1);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: var(--secondary);
            margin-right: 15px;
        }
        
        .legal-content {
            text-align: left;
            flex: 1;
        }
        
        .legal-title {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 5px;
            color: var(--secondary);
        }
        
        .legal-desc {
            font-size: 14px;
            color: #6B7280;
        }
        
        /* 退出登录 */
        .logout-section {
            text-align: center;
            margin: 30px 15px;
        }
        
        .logout-btn {
            color: #9CA3AF;
            font-size: 16px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 10px 20px;
        }
        
       /* 优化后的底部导航菜单 */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: white;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 1000;
    max-width: 428px;
    margin: 0 auto;
    border-radius: 20px 20px 0 0;
}

/* 修改后的底部导航项样式 */
.tab-bar a.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 5px 10px;
    min-height: 60px;
    border-radius: 16px;
    margin: 0 5px;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
    color: #495057;
}

.tab-item.active {
    background: rgba(234, 168, 42, 0.15);
    color: var(--primary);
}

.tab-item.active .tab-icon {
    color: var(--primary);
    transform: scale(1.1);
}

.tab-item.active .tab-label {
    font-weight: 600;
}

.tab-icon {
    font-size: 1.4rem;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    color: #6c757d;
}

.tab-item.active .tab-icon {
    color: var(--primary);
}

.tab-label {
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}
        /* 信任提示 */
        .trust-notice {
            background: #f0fdf4;
            border-radius: 12px;
            margin: 15px;
            padding: 12px 15px;
            font-size: 13px;
            color: var(--secondary);
            display: flex;
            align-items: center;
            border: 1px solid #dcfce7;
        }
        
        .trust-notice i {
            margin-right: 10px;
            font-size: 16px;
        }
    </style>
</head>
<body>
    <!-- 顶部品牌区域 -->
    <header class="brand-header">
        <div class="back-btn" id="backBtn">
            <i class="fas fa-arrow-left"></i>
        </div>
        <div>
            <div class="brand-title">吉象出海</div>
            <div class="brand-subtitle">泰国专业房地产服务平台</div>
        </div>
        <div></div>
    </header>
    
    <!-- 用户身份卡片 -->
    <div class="profile-card">
        <div class="user-info">
            <div class="user-name">
                <span class="crown"><i class="fas fa-crown"></i></span>
                <span>张先生 · 曼谷</span>
            </div>
            <div class="user-location">
                <i class="fas fa-map-marker-alt"></i>
                主要关注区域：素坤逸、拉玛9
            </div>
            
            <div class="trust-badges">
                <div class="trust-badge">
                    <i class="fas fa-shield-alt"></i> 资金监管中
                </div>
                <div class="trust-badge">
                    <i class="fas fa-medal"></i> 会员有效期至2025/12
                </div>
            </div>
            
            <div class="user-id">
                <span>ID: wx39972161</span>
                <span class="vip-link">升级VIP享专属客服 <i class="fas fa-chevron-right"></i></span>
            </div>
        </div>
    </div>
    
    <!-- 中介认证条 -->
    <div class="agent-bar">
        <div class="agent-info">
            <div class="agent-title">
                <i class="fas fa-rocket"></i> 认证中介享房源置顶特权
            </div>
            <div class="agent-desc">提升曝光率，增加客户咨询量</div>
        </div>
        <button class="agent-btn" id="agentBtn">申请经纪人</button>
    </div>
    
    <!-- 服务分进度条（中介可见） -->
    <div class="score-container" id="agentScore" style="display:none">
        <div class="score-header">
            <div class="score-title">服务分</div>
            <div class="score-value">87/100</div>
        </div>
        <div class="progress-bar">
            <div class="progress-fill"></div>
        </div>
        <div class="progress-label">良好 · 超过92%同城中介</div>
        <div class="progress-stats">
            <i class="fas fa-chart-line"></i> 当前佣金提升15%
        </div>
    </div>
    
    <!-- 信任提示 -->
    <div class="trust-notice">
        <i class="fas fa-lock"></i>
        首付款由盘谷银行监管 | 平台纠纷率 &lt; 0.3%
    </div>
    
    <!-- 高频找房工具 -->
    <div class="section">
        <div class="section-header">
            <div class="section-title">我的找房工具</div>
        </div>
        <div class="tools-grid">
            <div class="tool-card">
                <div class="tool-icon"><i class="fas fa-search"></i></div>
                <div class="tool-name">帮我找房</div>
            </div>
            <div class="tool-card">
                <div class="tool-icon"><i class="fas fa-heart"></i></div>
                <div class="tool-name">我的收藏</div>
            </div>
            <div class="tool-card">
                <div class="tool-icon"><i class="fas fa-history"></i></div>
                <div class="tool-name">浏览记录</div>
            </div>
        </div>
    </div>
    
    <!-- 预约管理 -->
    <div class="section">
        <div class="section-header">
            <div class="section-title">预约管理</div>
        </div>
        <div class="function-group">
            <div class="function-item">
                <div class="function-icon"><i class="fas fa-calendar-check"></i></div>
                <div class="function-name">预约客户</div>
                <div class="function-value">3个待处理</div>
                <i class="fas fa-chevron-right expand-icon"></i>
            </div>
            <div class="function-item">
                <div class="function-icon"><i class="fas fa-calendar-day"></i></div>
                <div class="function-name">我预约的</div>
                <div class="function-value">2个行程</div>
                <i class="fas fa-chevron-right expand-icon"></i>
            </div>
            <div class="function-item">
                <div class="function-icon"><i class="fas fa-share-alt"></i></div>
                <div class="function-name">我分享的</div>
                <div class="function-value">12次</div>
                <i class="fas fa-chevron-right expand-icon"></i>
            </div>
        </div>
    </div>
    
    <!-- 消息中心 -->
    <div class="section">
        <div class="section-header">
            <div class="section-title">消息中心</div>
        </div>
        <div class="function-group">
            <div class="function-item">
                <div class="function-icon"><i class="fas fa-comments"></i></div>
                <div class="function-name">我的消息</div>
                <div class="function-value">5条未读</div>
                <i class="fas fa-chevron-right expand-icon"></i>
            </div>
            <div class="function-item">
                <div class="function-icon"><i class="fas fa-qrcode"></i></div>
                <div class="function-name">专属二维码</div>
                <div class="function-value"></div>
                <i class="fas fa-chevron-right expand-icon"></i>
            </div>
        </div>
    </div>
    
    <!-- 房源管理 -->
    <div class="section">
        <div class="section-header">
            <div class="section-title">房源管理</div>
        </div>
        <div class="function-group">
            <div class="function-item" id="toggleProperty">
                <div class="function-icon"><i class="fas fa-home"></i></div>
                <div class="function-name">我的房源</div>
                <div class="function-value">8套</div>
                <i class="fas fa-chevron-down expand-icon"></i>
            </div>
            
            <div class="sub-items" id="propertyItems">
                <div class="sub-item">二手房管理</div>
                <div class="sub-item">出租房源管理</div>
                <div class="sub-item">土地管理 (1莱=1600㎡)</div>
                <div class="sub-item">VR制作</div>
                <div class="sub-item">交易进度跟踪</div>
            </div>
        </div>
    </div>
    
    <!-- 法律保障 -->
    <div class="legal-section">
        <div class="legal-card" id="legalCard">
            <div class="legal-icon">
                <i class="fas fa-balance-scale"></i>
            </div>
            <div class="legal-content">
                <div class="legal-title">中泰购房法律指南</div>
                <div class="legal-desc">了解泰国购房法律与权益保障</div>
            </div>
        </div>
    </div>
    
    <!-- 退出登录 -->
    <div class="logout-section">
        <button class="logout-btn" id="logoutBtn">
            <i class="fas fa-sign-out-alt"></i> 退出登录
        </button>
    </div>
    
    <!-- 底部导航菜单 -->
    <div class="tab-bar">
        <a href="home.html" class="tab-item">
            <div class="tab-icon"><i class="fas fa-home"></i></div>
            <div class="tab-label">首页</div>
        </a>
        <a href="message.html" class="tab-item">
            <div class="tab-icon"><i class="fas fa-comment-dots"></i></div>
            <div class="tab-label">消息</div>
        </a>
        <a href="postlist.html" class="tab-item">
            <div class="tab-icon"><i class="fas fa-plus-circle"></i></div>
            <div class="tab-label">发布</div>
        </a>
        <a href="entrust.html" class="tab-item">
            <div class="tab-icon"><i class="fas fa-handshake"></i></div>
            <div class="tab-label">委托</div>
        </a>
        <a href="profile.html" class="tab-item  active">
            <div class="tab-icon"><i class="fas fa-user"></i></div>
            <div class="tab-label">我的</div>
        </a>
    </div>
    
    <script>
        // 底部导航交互
        document.querySelectorAll('.tab-bar a.tab-item').forEach(item => {
            item.addEventListener('click', function(e) {
                if(this.classList.contains('active')) {
                    e.preventDefault();
                }
                document.querySelectorAll('.tab-bar a.tab-item').forEach(i => i.classList.remove('active'));
                this.classList.add('active');
            });
        });
        
        // 用户身份切换（模拟）
        let isAgent = false;
        
        // 切换中介身份
        document.getElementById('agentBtn').addEventListener('click', function() {
            isAgent = !isAgent;
            if(isAgent) {
                this.textContent = '中介工作台';
                document.getElementById('agentScore').style.display = 'block';
                // 添加微动效
                this.style.transform = 'scale(1.05)';
                setTimeout(() => {
                    this.style.transform = 'scale(1)';
                }, 300);
            } else {
                this.textContent = '申请经纪人';
                document.getElementById('agentScore').style.display = 'none';
            }
        });
        
        // 房源管理折叠/展开
        document.getElementById('toggleProperty').addEventListener('click', function() {
            const subItems = document.getElementById('propertyItems');
            const icon = this.querySelector('.expand-icon');
            
            if(subItems.classList.contains('show')) {
                subItems.classList.remove('show');
                icon.classList.remove('fa-chevron-up');
                icon.classList.add('fa-chevron-down');
            } else {
                subItems.classList.add('show');
                icon.classList.remove('fa-chevron-down');
                icon.classList.add('fa-chevron-up');
            }
        });
        
        // 法律指南点击
        document.getElementById('legalCard').addEventListener('click', function() {
            alert('即将打开中泰购房法律指南');
        });
        
        // 退出登录
        document.getElementById('logoutBtn').addEventListener('click', function() {
            if(confirm('确定要退出登录吗？')) {
                alert('已退出登录');
            }
        });
        
     // 返回按钮 - 直接返回首页
document.getElementById('backBtn').addEventListener('click', function() {
    window.location.href = 'home.html'; // 直接跳转到首页
    // 或者使用 history.back() 返回上一页
    // history.back();
});
        
        // 底部导航交互
        document.querySelectorAll('.nav-item').forEach(item => {
            item.addEventListener('click', function() {
                document.querySelectorAll('.nav-item').forEach(i => i.classList.remove('active'));
                this.classList.add('active');
            });
        });
        
        // 模拟汇率更新
        function updateRate() {
            const rate = (5.2 + (Math.random() * 0.05 - 0.025)).toFixed(2);
            document.querySelector('.rate-badge').textContent = `1¥=${rate}฿`;
        }
        setInterval(updateRate, 5000);
    </script>
</body>
</html>